from core.basehandler import BaseHandler
from core.room import Room
from core.action import Action

class Beginning(Room):
    
    def __init__(self, room_id):
        Room.__init__(self, room_id)    # do basic initialization for every room
        self.music = 1
        # build list of actions
        self.add_action(In)
    
    # return description of room.
    def get_description(self):
        return ''' You are Billy, a 14 year old computer whiz, and you are madly in love with Velma, an exchange student from Kyrgyzstan. \n 
        Today, you summoned all of you courage to ask Velma to the Prom. \n
        On the way to her house, you will need to make some purchases to help win her over. \n '''
    # return image of room
    def get_image(self):
        return 'introbilly.jpg'
    
    # define the music path for room
    def get_musicpath(self):
        return 'images/Intro_music.mp3'
         

class BeginningHandler(BaseHandler):
    
    # return class to use to create a new instance of this room
    def get_room_class(self):
        return Beginning

# define actions for this room

class In(Action):
    def __init__(self):
        Action.__init__(self, "In")    # do basic initialization for every action
    
    # return description of action (used in label on webpage)
    def get_description(self):
        return "Get Started"
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'bedroom'
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"